
.input-text{
    width: 300px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #d8dce5;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
    box-sizing: border-box;
    &::-webkit-input-placeholder{
        color: #97a8be
    }
    &::-moz-placeholder{
        color: #97a8be
    }
    &:-ms-input-placeholder{
        color: #97a8be
    }
    &::placeholder{
        color: #97a8be
    }
    &:hover{
        border-color: #8391a5;
    }
    &:disabled{
        background: #f5f7fa;
        border-color: #dfe4ed;
        color: #b4bccc;
        cursor: not-allowed;
    }
}

.input-checkbox{
    position: relative;
    input[type='checkbox']{
        position: absolute;
        z-index: -1;
        display: none;
        &:checked ~{
            span{
                &:before{
                    background: $primary;
                }
                &:after{
                    transform: rotate(45deg) scaleY(1);
                }
            }
        }
        &:disabled{
            ~ span:before{
                background: #eef1f6;
                border-color: #d1dbe5;
                cursor: not-allowed;
            }
            &:checked ~ span:before{
                background: #d1dbe5;
            }
        }
    }
    span{
        position: relative;
        display: inline-block;
        padding-left: 20px;
        min-height: 16px;
        line-height: 16px;
        &:before{
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            display: block;
            width: 16px;
            height: 16px;
            background: transparent;
            border: 1px solid $primary;
            border-radius: 2px;
            box-sizing: border-box;
        }
        &:after{
            content: '';
            position: absolute;
            top: 2px;
            left: 5px;
            display: block;
            width: 4px;
            height: 8px;
            box-sizing: content-box;
            border-right: 2px solid #fff;
            border-bottom: 2px solid #fff;
            transform: rotate(45deg) scaleY(0);
            transition: transform .15s cubic-bezier(.71, -.46, .88, .6) .05s
        }
    }
}

.input-radio{
    position: relative;
    input[type='radio']{
        position: absolute;
        z-index: -1;
        display: none;
        &:checked ~{
            span{
                &:before{
                    border-color: $primary;
                    background: $primary;
                }
                &:after{
                    display: block;
                }
            }
        }
        &:disabled{
            ~ span{
                &:before{
                    background: #eef1f6;
                    border-color: #d1dbe5;
                    cursor: not-allowed;
                }
                &:after{
                    display: none;
                }
            }
            &:checked ~ span:before{
                background: #d1dbe5;
            }
        }
    }
    span{
        position: relative;
        display: inline-block;
        min-width: 16px;
        min-height: 16px;
        //transition: background-color .25s cubic-bezier(.71, -.46, .29, 1.46);
        &:before{
            content: '';
            display: block;
            width: 16px;
            height: 16px;
            background: transparent;
            border: 1px solid #d8dce5;
            border-radius: 50%;
            box-sizing: border-box;
        }
        &:after{
            content: '';
            position: absolute;
            top: 6px;
            left: 6px;
            display: none;
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: #fff;
            box-sizing: content-box;
        }
        &:hover:before{
            border-color: $primary;
        }
    }
}

.required{
    position: relative;
    display: inline-block;
    &:before{
        content: '*';
        position: absolute;
        top: 0;
        left: -7px;
        font-size: 16px;
        color: $red;
    }
}

.form-list{
    padding: 10px;
    box-sizing: border-box;
    &.col-2{
        display: flex;
        flex-wrap: wrap;
        .form-item{
            flex: 0 0 50%;
            &.col-1{
                flex: 0 0 100%;
            }
        }
    }
}

.search-bar{
    @include clearfix();
    .form-item{
        float: left;
        width: 360px;
        &.col-1{
            width: 100%;
        }
        .input-text, .el-input, .el-select, .el-date-editor, .el-range-editor{
            width: 100%;
        }
        .el-range-editor{
            .el-range-separator{
                padding: 0;
            }
            .el-range__close-icon{
                margin-right: -5px;
            }
        }
    }
}

.form-item{
    $height: 36px;
    $title-width: 100px;
    
    position: relative;
    min-height: $height;
    padding-left: $title-width;
    margin-bottom: 10px;
    line-height: $height;
    font-size: 14px;
    box-sizing: border-box;
    .item-title{
        position: absolute;
        top: 0;
        left: 0;
        display: block;
        width: $title-width;
        height: 100%;
        margin-left: -10px;
        text-align: right;
        font-size: 14px;
    }
    .input-text{
        height: $height;
    }
    .el-select, .el-cascader{
        width: 300px;
    }
    .textarea{
        width: 300px;
        height: 100px;
        padding: 5px 8px;
        border: 1px solid $border-color;
        border-radius: 4px;
        line-height: 1.5em;
        font-size: 14px;
        box-sizing: border-box;
        overflow: auto;
    }
    .error-tip{
        position: absolute;
        left: $title-width;
        bottom: -12px;
        font-size: 12px;
        color: $error;
        line-height: 1em;
    }
}

h4.title{
    padding: 20px 0 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid $border-color;
    font-size: 18px;
    font-weight: normal;
}

h5.title{
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: normal;
}

.btn-center{
    padding: 20px 10px;
    text-align: center;
}

.tool-bar{
    padding: 10px 0;
    @include clearfix();
    .el-select{
        width: 200px;
    }
}

.main-title{
    background-color: #fff;
    height: 50px;
    padding: 7px 15px;
    margin-bottom: 20px;
    color: #676a6c;
    line-height: 36px;
    @include clearfix();
    h4{
        float: left;
        font-weight: bold;
        font-size: 16px;
    }
    .btn-box{
        float: right;
    }
}

.img-box{
    position: relative;
    display: block;
    width: 80px;
    height: 80px;
    margin: 5px;
    border: 1px solid $border-color;
    border-radius: 4px;
    overflow: hidden;
    .img-add{
        position: relative;
        z-index: 2;
        display: block;
        height: 100%;
        width: 100%;
        background: transparent;
        text-align: center;
        line-height: 80px;
        font-size: 40px;
        cursor: pointer;
    }
    img{
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 1;
        display: block;
        max-width: 100%;
        max-height: 100%;
        transform: translate(-50%, -50%);
    }
}

.img-view{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    img{
        position: absolute;
        top: 50%;
        left: 50%;
        max-width: 80vw;
        max-height: 80vh;
        transform: translate(-50%, -50%);
    }
}

.tabs-wrap{
    background: #fff;
    border: 1px solid #dcdfe6;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04);
    .tabs-content{
        padding: 20px;
    }
}

.tabs-link{
    background: #f5f7fa;
    border-bottom: 1px solid #dfe4ed;
    .tab{
        height: 40px;
        margin: 0 -1px -1px;
        padding: 0 20px;
        box-sizing: border-box;
        line-height: 40px;
        display: inline-block;
        list-style: none;
        font-size: 14px;
        font-weight: 500;
        position: relative;
        border: 1px solid transparent;
        color: #878d99;
        transition: all .3s cubic-bezier(.645, .045, .355, 1);
        &.router-link-active{
            color: #409eff;
            background-color: #fff;
            border-right-color: #d8dce5;
            border-left-color: #d8dce5;
        }
    }
}

.text-justify{
    text-align: center;
    p{
        display: inline-block;
        text-align: justify;
    }
}

.text-ellipsis{
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table{
    width: 100%;
    border-collapse: collapse;
    thead{
        &.hide th{
            padding: 0;
            height: 0;
            border: 0;
            overflow: hidden;
        }
        th{
            background: #fefefe;
            font-weight: normal;
        }
    }
    td, th{
        padding: 10px;
        border: 1px solid $border-color;
        vertical-align: middle;
        text-align: center;
        font-size: 14px;
        color: $content;
        line-height: 24px;
        .ellipsis{
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: normal;
            word-break: break-all;
        }
    }
}

.upload-img-list{
    @include clearfix();
    li{
        position: relative;
        float: left;
        width: 180px;
        height: 180px;
        margin: 5px;
        box-sizing: border-box;
    }
    .img-preview{
        border: 1px solid #d9d9d9;
        border-radius: 6px;
        line-height: 178px;
        text-align: center;
        overflow: hidden;
        &:hover .img-preview-mask{
            background: rgba(0, 0, 0, .4);
            transform: translateY(0);
        }
        img, video{
            position: absolute;
            top: 50%;
            left: 50%;
            max-width: 100%;
            max-height: 100%;
            transform: translate(-50%, -50%);
        }
        .img-preview-mask{
            position: absolute;
            top: 0;
            left: 0;
            z-index: 3;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, .6);
            transform: translateY(-100%);
            transition: all .2s;
            .mask-btn{
                margin-top: 71px;
                line-height: 36px;
                text-align: center;
                i{
                    margin: 0 2px;
                    color: #fff;
                    cursor: pointer;
                }
            }
        }
    }
    .upload-btn{
        display: block;
        width: 180px;
        height: 180px;
        line-height: 178px;
        text-align: center;
        border: 1px dashed #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        overflow: hidden;
        box-sizing: border-box;
        input{
            display: none;
        }
        .el-icon-plus{
            font-size: 28px;
            color: #8c939d;
        }
    }
}

.tag-checkbox-group-switch{
    display: none;
    &:checked + .tag-checkbox-group-more{
        height: auto;
    }
}

.tag-checkbox-group-more{
    position: relative;
    height: 36px;
    padding-right: 60px;
    overflow: hidden;
    .tag-checkbox-group-more-btn{
        position: absolute;
        top: 0;
        right: 10px;
        display: block;
        width: 50px;
        height: 36px;
        line-height: 36px;
        text-align: center;
        color: $primary;
        font-size: 14px;
        cursor: pointer;
    }
}

.tinymce-container.editor-container iframe{
    min-height: 300px;
}